// 获取第二个 subject_heading_box
const secondSubjectBox = document.querySelectorAll('.subject_heading_box')[1];

for (let index = 0; index < array.length; index++) {

    // 创建内容盒子
    const contentBox = document.createElement('div');
    contentBox.className = 'content_box';

    // 创建主图
    const mainPic = document.createElement('div');
    mainPic.style.backgroundImage = `url(${array[index].arry_img[0]})`;
    mainPic.className = 'main_pic';

    // 创建宫格图片容器
    const subPicContainer = document.createElement('div');
    const subPics = [];
    for (let i = 0; i < array[index].arry_img.length; i++) {
        const subPic = document.createElement('div');
        subPic.className = 'sub_pic';
        subPic.style.backgroundImage = `url('${array[index].arry_img[i]}')`;
        subPics.push(subPic);
        subPicContainer.appendChild(subPic);
    }

    // 创建类型标签和图片数量标签
    const tagContainer = document.createElement('div');
    tagContainer.className = 'tags';
    const typeTag = document.createElement('li');
    typeTag.className = 'type_tag';
    typeTag.innerHTML = `<i class="iconfont ${array[index].type}"></i><span>${array[index].type_name}</span>`;
    const imageCountTag = document.createElement('li');
    imageCountTag.innerHTML = '<i class="iconfont icon-tupian"></i><span>+120</span>';
    tagContainer.appendChild(typeTag);
    tagContainer.appendChild(imageCountTag);

    // 将主图、宫格图片容器和标签容器添加到内容盒子
    contentBox.appendChild(mainPic);
    contentBox.appendChild(subPicContainer);
    contentBox.appendChild(tagContainer);

    // 将内容盒子添加到第二个 subject_heading_box 中
    secondSubjectBox.appendChild(contentBox);
}